-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Java] Define step definitions and hooks with minimal ceremony #2415
base: main
Are you sure you want to change the base?
Conversation
…tations in non-public methods (cucumber#2370)
Wow. I'll have to find some time to review this. It is likely that I won't have any in the next two weeks. |
Codecov Report
@@ Coverage Diff @@
## main #2415 +/- ##
============================================
- Coverage 83.64% 83.60% -0.05%
+ Complexity 2677 2641 -36
============================================
Files 319 317 -2
Lines 9441 9325 -116
Branches 918 908 -10
============================================
- Hits 7897 7796 -101
+ Misses 1204 1195 -9
+ Partials 340 334 -6
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick aside. I don't see any immediate problems with this.
I think this can be merged with the next major version.
However prior to merging we should update the code in the examples
module, the java
module documentation and the archetype
so it is clear that Cucumber with minimal ceremony is preferred.
Given that it will be some time before the next major version rolls around, and given that those changes mentioned above are fragile I think it would be prudent to delay them until merging.
After merging the https://github.com/cucumber/cucumber-java-skeleton should also be updated.
MethodScanner.scan(BaseSteps.class, backend); | ||
assertThat(scanResult, contains(new SimpleEntry<>(method, method.getAnnotations()[0]))); | ||
assertThat(scanResult, | ||
contains(new SimpleEntry<>(publicMethod, publicMethod.getAnnotations()[0]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using org.hamcrest.collection.IsMapContaining.hasEntry
for all these.
Would have been better if I had done that the first time round, but better late then never.
b85ab35
to
4e688d1
Compare
Note to self: Drop 0158029 before merging. Looks like it was an attempted fix for a different issue. |
7abc5b8
to
ce7b707
Compare
Is your pull request related to a problem? Please describe.
[Java] Allow non-private classes to contain hooks and allow hook annotations in non-public methods (#2370)
Describe the solution you have implemented
Additional context
None.